Optimal. Leaf size=36 \[ -\frac {(a+b) \text {ArcTan}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}+\frac {\cos (x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3269, 396, 211}
\begin {gather*} \frac {\cos (x)}{b}-\frac {(a+b) \text {ArcTan}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 396
Rule 3269
Rubi steps
\begin {align*} \int \frac {\sin ^3(x)}{a+b \cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {1-x^2}{a+b x^2} \, dx,x,\cos (x)\right )\\ &=\frac {\cos (x)}{b}-\frac {(a+b) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\cos (x)\right )}{b}\\ &=-\frac {(a+b) \tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}+\frac {\cos (x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(90\) vs. \(2(36)=72\).
time = 0.18, size = 90, normalized size = 2.50 \begin {gather*} \frac {-\left ((a+b) \text {ArcTan}\left (\frac {\sqrt {b}-\sqrt {a+b} \tan \left (\frac {x}{2}\right )}{\sqrt {a}}\right )\right )-(a+b) \text {ArcTan}\left (\frac {\sqrt {b}+\sqrt {a+b} \tan \left (\frac {x}{2}\right )}{\sqrt {a}}\right )+\sqrt {a} \sqrt {b} \cos (x)}{\sqrt {a} b^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 34, normalized size = 0.94
method | result | size |
default | \(\frac {\cos \left (x \right )}{b}+\frac {\left (-a -b \right ) \arctan \left (\frac {b \cos \left (x \right )}{\sqrt {a b}}\right )}{b \sqrt {a b}}\) | \(34\) |
risch | \(\frac {{\mathrm e}^{i x}}{2 b}+\frac {{\mathrm e}^{-i x}}{2 b}+\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right ) a}{2 \sqrt {a b}\, b}+\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right )}{2 \sqrt {a b}}-\frac {i \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right ) a}{2 \sqrt {a b}\, b}-\frac {i \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right )}{2 \sqrt {a b}}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 30, normalized size = 0.83 \begin {gather*} -\frac {{\left (a + b\right )} \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {\cos \left (x\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 95, normalized size = 2.64 \begin {gather*} \left [\frac {2 \, a b \cos \left (x\right ) - \sqrt {-a b} {\left (a + b\right )} \log \left (-\frac {b \cos \left (x\right )^{2} + 2 \, \sqrt {-a b} \cos \left (x\right ) - a}{b \cos \left (x\right )^{2} + a}\right )}{2 \, a b^{2}}, \frac {a b \cos \left (x\right ) - \sqrt {a b} {\left (a + b\right )} \arctan \left (\frac {\sqrt {a b} \cos \left (x\right )}{a}\right )}{a b^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 30, normalized size = 0.83 \begin {gather*} -\frac {{\left (a + b\right )} \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {\cos \left (x\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 28, normalized size = 0.78 \begin {gather*} \frac {\cos \left (x\right )}{b}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\cos \left (x\right )}{\sqrt {a}}\right )\,\left (a+b\right )}{\sqrt {a}\,b^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________